from django.contrib import admin
from .models import *


# Register your models here.
@admin.register(GroupInfo)
class CoursesAdmin(admin.ModelAdmin):
    # 要显示的字段
    list_display = ('GroupID',
                    'GroupName',
                    'create_date',
                    'Introduction'
                    )

    # 需要搜索的字段
    search_fields = ('GroupName', 'StudentID')

    # 分页显示，一页的数量
    list_per_page = 10

    actions_on_top = True


@admin.register(GroupMember)
class CoursesAdmin(admin.ModelAdmin):
    # 要显示的字段
    list_display = ('StudentID',
                    'GroupID',
                    'Auth'
                    )

    # 需要搜索的字段
    search_fields = ('GroupName', 'StudentID')

    # 分页显示，一页的数量
    list_per_page = 10

    actions_on_top = True
